package com.zhongc.advance.common.log;

import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.joran.JoranConfigurator;
import ch.qos.logback.core.joran.spi.JoranException;

public class Log {
	
	public static void configure(String contextConfigLocation){
		LoggerContext loggerContext = (LoggerContext) org.slf4j.LoggerFactory.getILoggerFactory();
		loggerContext.reset();
		JoranConfigurator joranConfigurator = new JoranConfigurator();
		joranConfigurator.setContext(loggerContext);
        try {
        	joranConfigurator.doConfigure(contextConfigLocation);
        } catch (JoranException e) {
            e.printStackTrace();
        }
	}

}
